<?php
/**
 * 发送电子邮件
 * 通过Magic Winmail 管理端工具
 * 每1封发送一次
 * <h2 style="color:#00A6FC;margin:10px 0;">IT娱乐网 ( <a href="http://www.itylw.com" target="_blank">www.itylw.com</a> ) </h2>

------下面是连接gtmaimai.com的邮件系统
        $mail->Host = "mail.gtmaimai.com"; // sets the SMTP server
        $mail->Port = 25;                    // set the SMTP port for the GMAIL server
        $mail->Username = "service@gtmaimai.com"; // SMTP account username
        $mail->Password = "serviceA8";        // SMTP account password
        $mail->SetFrom('service@gtmaimai.com', '钢豆圈_钢铁买卖网');
 */
exit("处理好");
set_time_limit(0);
$s8 = microtime(true);
ini_set('date.timezone', "Asia/Shanghai");

mysql_select_db("data_center",mysql_connect("localhost","data_center543","69o855o5o5"));
mysql_query("set names utf8");

$fp = fopen("status.txt", "a");//将当前的状态写入文件
include 'libEmail/phpmailer.php';
include 'libEmail/pop3.php';
include 'libEmail/smtp.php';
/**
 * ---------------------------------------------------应该写下面-------------------------------------------------
 * */
 //127.0.0.1,4574f56b
$host9 = array(
"a@it1.com",
"cvbrhr23rth@src886.com",
"dfgh23dfghvbn@src886.com",
"dgrhh23@src886.com",
"erger23g@src886.com",
"ergerg23er@src886.com",
"erge23rgerg@src886.com",
"erher23h@src886.com",
"f2332ghd@src886.com",
"fgnny23n5@src886.com",
"fn232rf23@src886.com",
"kyutt2323t@src886.com",
"rfhfg23323nc@src886.com",
"rger23323gerg@src886.com",
"rhuy23322322ukyuk@src886.com",
"s232342342hn@src886.com",
"vww32bnc@src886.com",
"vbncv@src886.com",
"sd1ere0sdfsdf@src886.com"
);
$title = "欧美的十位美胸女";
$url2 = "http://www.itylw.com/news/view/id/10105.php";
$result = mysql_query("SELECT * FROM email_csdn_all where id>=6235966 and id<=6254480");
$success=0;$faile=0;$i=0;
/**
 $row['email'] = "88ddqq@163.com";
 $row['email'] = "331048265@qq.com";
 800066913,continue;
*/
while ( $row = mysql_fetch_array($result, MYSQL_ASSOC) ) {
$row['email'] = "88ddqq@163.com";
$body = <<<eot
<HTML><BODY>
<h1><a style="text-decoration:none;" href="{$url2}?p_2={$row['email']}" target="_blank">{$title}</a></h1>
<hr style="height:0;border-style:dashed;border-width:1px 0 0;margin:12px 0 18px;">
	
<p style="color:#555555;font-family:'Helvetica Neue', HelveticaNeue, Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:16px;line-height:32px;text-indent:32px;white-space:normal;background-color:#FFFFFF;">
她们接戏也很受限制，无论到哪里都被贴着“事业线”的标签。所以为了星途坦荡，。这大概让 “一马平川”的妹子们听着伤心了，但不得不承认，她反而是这些大胸演员里面发展最好的一位。不偏题了，我们的主要目的还是要饱个眼福先。同时，也要向她们表示敬意，不管是hold不住的御姐型，还是美胸胜过了演技，不得不承认，养眼也是她们。。。。。<a href="{$url2}?p_2={$row['email']}" target="_blank">查看更多图片</a>
</p>
<p><a href="{$url2}?p_2={$row['email']}" target="_blank"><img src="http://www.itylw.com/upload/s/10-breast-a.jpg"/></a><a href="{$url2}?p_2={$row['email']}" target="_blank"><img src="http://www.itylw.com/upload/s/10-breast-b.jpg"/></a></p>
	
<div style="border-top: 2px solid #00A6FC; padding: 10px 0;">
<p style="color:#000;">请不要回复此邮件!您可以回复到<strong>itylw_admin@163.com</strong></p>

<div>如果您不想继续收到该邮件，可点此 <a href="http://www.itylw.com/news/ect.php?p_2={$row['email']}" target="_blank">退订</a> 。</div>
<img src="http://www.itylw.com/{$row['email']}/c9.jpeg"/>
</div>
</BODY></HTML>
eot;
	unset($mail);
	$mail = new mailer_phpmailer();
	$mail->IsSMTP();
	$mail->SMTPDebug = 1;
	$mail->SMTPAuth = true;
	$mail->CharSet = "utf-8";
	
	$imode = $i%19;
	$mail->Host = "127.0.0.1";
	$mail->Port = 25;
	$mail->Username = $host9[$imode];
	$mail->Password = "4574f56b";
	$mail->SetFrom($host9[$imode], "娱乐网");
	
	$mail->Subject = $title;
	$mail->MsgHTML($body);
	$mail->AddAddress($row['email'], null);
	
	if($mail->Send() === true)
		$success++;
	else 
		$faile++;
	
	$i++;
	if($i%20 == 0){
		$end8 = date("Y-m-d H:i:s");
		fwrite($fp, "i1:{$i},s:{$success},f:{$faile},D:{$end8},|,");
	}
	break;
}

echo "成功:".$success."失败:".$faile;
echo "<br>用时:".number_format(microtime(true) - $s8, 3, '.', '')."秒";